# coding:utf-8

names = ['诸葛亮', '刘备', '张飞']
for name in names:
    print(name)
print('+++++++++++++++++')
print(names[0])
print(names[1])
print(names[2])
# IndexError: list index out of range
# print(names[3])
print('+++++++++++++++++')
# len函数获取长度
print(f'names 的长度  = {len(names)}')
for index in range(len(names)):
    print(names[index])
